package com.kancy.vip.pattern.factory.abstractfactory;

import com.kancy.vip.pattern.factory.Computer;
import com.kancy.vip.pattern.factory.products.DellComputer;
import com.kancy.vip.pattern.factory.products.LenoveComputer;

/**
 * 同样是在AProductFactory基础上扩展功能 ComputerFactory
 *
 * 也可以通过组合的方式，对AProductFactory进行扩展
 *
 * 不推荐依赖具体
 *
 * 尽量依赖接口编程，而不依赖具体实现类
 */
public class CProductFactory extends AProductFactory implements ProductFamilyFactory {

    @Override
    public Computer createDell() {
        return new DellComputer();
    }

    @Override
    public Computer createLenove() {
        return new LenoveComputer();
    }
}
